<template>
  <!-- 雷达图  图表必须给高和宽度-->
  <div ref="myDiv" class="radar-echart" />
</template>

<script>
var echarts = require('echarts/lib/echarts') // 引入echarts主模块
require('echarts/lib/chart/radar') // 引入雷达图
// 引入提示框和标题组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
export default {
  mounted() {
    const chart = echarts.init(this.$refs.myDiv)
    chart.setOption({

      title: {
        text: '基础雷达图'
      },

      radar: {
        // shape: 'circle',
        indicator: [
          { name: '考勤', max: 6500 },
          { name: '技术', max: 16000 },
          { name: '管理', max: 30000 },
          { name: '分享', max: 38000 },
          { name: 'bug', max: 52000 },
          { name: '助人', max: 25000 }
        ]
      },
      series: [
        {
          name: 'Budget vs spending',
          type: 'radar',
          data: [
            {
              value: [1200, 3000, 20000, 700, 10000, 18000],
              name: 'Allocated Budget'
            },
            {
              value: [5000, 14000, 8000, 6000, 42000, 1000],
              name: 'Actual Spending'
            }
          ]
        }
      ]
    }
    )
  }
}
</script>

<style>
.radar-echart {
    width: 600px;
    height: 400px;
}
</style>
